import request from '@/utils/request'
import { remove } from 'nprogress'

//医院设置的相关请求

const API ="/admin/hosp/hospitalSet";
export default {
  
  //分页条件查询
  getList(page,size,seachObj){
    return request({
      url: `${API}/pageQuery/${page}/${size}`,
      method: 'post',
      data: seachObj //params参数以字符串传递  data 参数以json 对象传递
    })
  },

  //根据id 删除
  removeById(id){
    return request({
      url: `${API}/${id}`,
      method: 'delete',
    
    })
  },

  //添加
  add(hospset){
    return request({
      url: `${API}/add`,
      method: 'post',
      data: hospset
    
    })
  },

   //根据id 查询
   getById(id){
    return request({
      url: `${API}/${id}`,
      method: 'get',
    
    })
  },

  //修改
  updateById(hospset){
    return request({
      url: `${API}/update`,
      method: 'post',
      data: hospset
    
    })
  },

  //批量 删除
  batchRemove(idList){
    return request({
      url: `${API}/bachRemove`,
      method: 'delete',
      data:idList,
    
    })
  },

  //锁定与解锁
  lockById(id,status){
    return request({
      url: `${API}/updateStatus/${id}/${status}`,
      method: 'post',
    
    })
  },
}
